<fieldset id="atachments_zone">
	<legend><?php echo __('Files')?></legend>
		<?php echo __('Click on this icon to add files to the form')?>
		<?php echo link_to('<img title="'.__('Add an attachment').'" src="/images/icons/48/attachment.png">','attachments/new?saveToDB=0', array('class'=>'fancy'));?>
	<div id="listeFichiers"></div>
</fieldset>
<?php include_partial('attachments/jsAttachment', array('self'=>$form, 'fromDb'=>false))?>
<script type="text/javascript">
fancyOptions = {
		'type'					: 'ajax',
		'autoDimensions'		: true,
		'transitionIn'			:'elastic',
		'transitionOut'			:'elastic',
		'overlayShow' 			:true,
		'overlayOpacity' 		:0.3,
		'hideOnOverlayClick'	:true,
		'margin'				:50,
		'padding'				:10,
		'speedIn'				:600, 
		'speedOut'				:200, 
		'titleShow'				:false,
		'modal' 				:false,
		'helpers': {
			'overlay' : {
				'closeClick' : false  //Prevents to close when clicking outside box
			}
		}	
	};
	$(document).ready(function(){
		$("a.fancy").fancybox(fancyOptions);
	});
</script>